from apps.education.coursecate.baseViews import *


class CoursecateViewSet(BaseCoursecateViewSet):
    def get_queryset(self):
        params = getRequestParams(self.request)
        _list = CoursecateDao().findAll()
        return _list
    

    @action(methods=['get'], detail=False)
    def getTagList(self, request):
        _generas = CoursecateDao().findAll().order_by('id')
        data = CoursecateModelSerializer(_generas, many=True).data

        return Response(response_success({'list': [{'name': '推荐', 'key': 'recommend'}] + data}))
